.class public Lcom/estrongs/android/ui/dlna/activity/DlnaDeviceFileSelectActivity;
.super Lcom/estrongs/android/ui/base/HomeAsBackActivity;
.source "DlnaDeviceFileSelectActivity.java"

# interfaces
.implements Lcom/estrongs/android/pop/app/filetransfer/fragment/AbsSelectFileFragment$d;


# instance fields
.field private j:Lcom/google/android/material/tabs/TabLayout;

.field private k:Landroidx/viewpager/widget/ViewPager;

.field private l:Landroidx/appcompat/app/ActionBar;

.field protected m:Landroidx/appcompat/widget/Toolbar;

.field private n:Ljava/lang/String;

.field public o:Lcom/estrongs/android/pop/app/filetransfer/FragmentAdapter;

.field public p:Lcom/estrongs/android/pop/app/filetransfer/fragment/AbsSelectFileFragment;

.field private final q:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Lcom/estrongs/android/pop/app/filetransfer/fragment/AbsSelectFileFragment;",
            ">;"
        }
    .end annotation
.end field

.field private r:Les/l10;


# direct methods
.method public constructor <init>()V
    .locals 1

    .line 1
    invoke-direct {p0}, Lcom/estrongs/android/ui/base/HomeAsBackActivity;-><init>()V

    const-string v0, "tag"

    .line 2
    iput-object v0, p0, Lcom/estrongs/android/ui/dlna/activity/DlnaDeviceFileSelectActivity;->n:Ljava/lang/String;

    .line 3
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/estrongs/android/ui/dlna/activity/DlnaDeviceFileSelectActivity;->q:Ljava/util/List;

    return-void
.end method

.method private F()V
    .locals 2

    const v0, 0x7f090247

    .line 1
    invoke-virtual {p0, v0}, Landroidx/appcompat/app/AppCompatActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    const/16 v1, 0x8

    .line 2
    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setVisibility(I)V

    return-void
.end method

.method private G()V
    .locals 2

    .line 1
    invoke-static {}, Lcom/estrongs/android/pop/view/FileExplorerActivity;->a1()Lcom/estrongs/android/pop/view/FileExplorerActivity;

    move-result-object v0

    if-eqz v0, :cond_0

    const-string v1, "dlna_device://"

    .line 2
    invoke-virtual {v0, v1}, Lcom/estrongs/android/pop/view/FileExplorerActivity;->j(Ljava/lang/String;)Lcom/estrongs/android/view/FileGridViewWrapper;

    .line 3
    :cond_0
    invoke-virtual {p0}, Landroid/app/Activity;->finish()V

    return-void
.end method

.method private a(J)Ljava/lang/String;
    .locals 2

    .line 5
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v1, "android:switcher:2131296372:"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0, p1, p2}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    return-object p1
.end method

.method static synthetic a(Lcom/estrongs/android/ui/dlna/activity/DlnaDeviceFileSelectActivity;)Ljava/util/List;
    .locals 0

    .line 1
    iget-object p0, p0, Lcom/estrongs/android/ui/dlna/activity/DlnaDeviceFileSelectActivity;->q:Ljava/util/List;

    return-object p0
.end method

.method public static a(Landroid/content/Context;Les/l10;)V
    .locals 1

    .line 2
    invoke-static {}, Lcom/estrongs/android/dlna/c;->g()Lcom/estrongs/android/dlna/c;

    move-result-object v0

    invoke-virtual {v0, p1}, Lcom/estrongs/android/dlna/c;->a(Les/l10;)V

    .line 3
    new-instance p1, Landroid/content/Intent;

    const-class v0, Lcom/estrongs/android/ui/dlna/activity/DlnaDeviceFileSelectActivity;

    invoke-direct {p1, p0, v0}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 4
    invoke-virtual {p0, p1}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V

    return-void
.end method


# virtual methods
.method protected C()Z
    .locals 1

    const/4 v0, 0x1

    return v0
.end method

.method public a()V
    .locals 0

    return-void
.end method

.method public b(I)V
    .locals 1

    .line 1
    iget-object p1, p0, Lcom/estrongs/android/ui/dlna/activity/DlnaDeviceFileSelectActivity;->n:Ljava/lang/String;

    const-string v0, "TransferFileSelectActivity update confirmbth text"

    invoke-static {p1, v0}, Lcom/estrongs/android/util/n;->d(Ljava/lang/String;Ljava/lang/String;)V

    return-void
.end method

.method public onBackPressed()V
    .locals 1

    .line 1
    invoke-virtual {p0}, Landroidx/fragment/app/FragmentActivity;->getSupportFragmentManager()Landroidx/fragment/app/FragmentManager;

    move-result-object v0

    invoke-virtual {v0}, Landroidx/fragment/app/FragmentManager;->getBackStackEntryCount()I

    move-result v0

    if-nez v0, :cond_0

    .line 2
    invoke-direct {p0}, Lcom/estrongs/android/ui/dlna/activity/DlnaDeviceFileSelectActivity;->G()V

    goto :goto_0

    .line 3
    :cond_0
    invoke-virtual {p0}, Landroidx/fragment/app/FragmentActivity;->getSupportFragmentManager()Landroidx/fragment/app/FragmentManager;

    move-result-object v0

    invoke-virtual {v0}, Landroidx/fragment/app/FragmentManager;->popBackStack()V

    :goto_0
    return-void
.end method

.method protected onCreate(Landroid/os/Bundle;)V
    .locals 6

    .line 1
    invoke-super {p0, p1}, Lcom/estrongs/android/ui/base/HomeAsBackActivity;->onCreate(Landroid/os/Bundle;)V

    const v0, 0x7f0c003f

    .line 2
    invoke-virtual {p0, v0}, Lcom/estrongs/android/ui/base/HomeAsBackActivity;->setContentView(I)V

    const v0, 0x7f110314

    .line 3
    invoke-virtual {p0, v0}, Landroid/app/Activity;->getString(I)Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p0, v0}, Landroid/app/Activity;->setTitle(Ljava/lang/CharSequence;)V

    const v0, 0x7f090bdd

    .line 4
    invoke-virtual {p0, v0}, Landroidx/appcompat/app/AppCompatActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroidx/appcompat/widget/Toolbar;

    iput-object v0, p0, Lcom/estrongs/android/ui/dlna/activity/DlnaDeviceFileSelectActivity;->m:Landroidx/appcompat/widget/Toolbar;

    .line 5
    invoke-virtual {p0, v0}, Lcom/estrongs/android/pop/esclasses/ESActivity;->setSupportActionBar(Landroidx/appcompat/widget/Toolbar;)V

    .line 6
    invoke-virtual {p0}, Landroidx/appcompat/app/AppCompatActivity;->getSupportActionBar()Landroidx/appcompat/app/ActionBar;

    move-result-object v0

    iput-object v0, p0, Lcom/estrongs/android/ui/dlna/activity/DlnaDeviceFileSelectActivity;->l:Landroidx/appcompat/app/ActionBar;

    .line 7
    invoke-direct {p0}, Lcom/estrongs/android/ui/dlna/activity/DlnaDeviceFileSelectActivity;->F()V

    const v0, 0x7f090073

    .line 8
    invoke-virtual {p0, v0}, Landroidx/appcompat/app/AppCompatActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Lcom/google/android/material/tabs/TabLayout;

    iput-object v0, p0, Lcom/estrongs/android/ui/dlna/activity/DlnaDeviceFileSelectActivity;->j:Lcom/google/android/material/tabs/TabLayout;

    const/4 v1, 0x0

    .line 9
    invoke-virtual {v0, v1}, Lcom/google/android/material/tabs/TabLayout;->setTabMode(I)V

    .line 10
    invoke-static {}, Lcom/estrongs/android/dlna/c;->g()Lcom/estrongs/android/dlna/c;

    move-result-object v0

    invoke-virtual {v0}, Lcom/estrongs/android/dlna/c;->b()Les/l10;

    move-result-object v0

    iput-object v0, p0, Lcom/estrongs/android/ui/dlna/activity/DlnaDeviceFileSelectActivity;->r:Les/l10;

    .line 11
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    .line 12
    invoke-virtual {p0}, Lcom/estrongs/android/pop/esclasses/ESActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v2

    const v3, 0x7f110216

    invoke-virtual {v2, v3}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v2

    invoke-interface {v0, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 13
    invoke-virtual {p0}, Lcom/estrongs/android/pop/esclasses/ESActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v2

    const v3, 0x7f110215

    invoke-virtual {v2, v3}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v2

    invoke-interface {v0, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 14
    invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v2

    :goto_0
    invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z

    move-result v3

    if-eqz v3, :cond_0

    invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Ljava/lang/String;

    .line 15
    iget-object v4, p0, Lcom/estrongs/android/ui/dlna/activity/DlnaDeviceFileSelectActivity;->j:Lcom/google/android/material/tabs/TabLayout;

    invoke-virtual {v4}, Lcom/google/android/material/tabs/TabLayout;->newTab()Lcom/google/android/material/tabs/TabLayout$Tab;

    move-result-object v5

    invoke-virtual {v5, v3}, Lcom/google/android/material/tabs/TabLayout$Tab;->setText(Ljava/lang/CharSequence;)Lcom/google/android/material/tabs/TabLayout$Tab;

    move-result-object v3

    invoke-virtual {v4, v3}, Lcom/google/android/material/tabs/TabLayout;->addTab(Lcom/google/android/material/tabs/TabLayout$Tab;)V

    goto :goto_0

    :cond_0
    const v2, 0x7f090074

    .line 16
    invoke-virtual {p0, v2}, Landroidx/appcompat/app/AppCompatActivity;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroidx/viewpager/widget/ViewPager;

    iput-object v2, p0, Lcom/estrongs/android/ui/dlna/activity/DlnaDeviceFileSelectActivity;->k:Landroidx/viewpager/widget/ViewPager;

    .line 17
    invoke-virtual {p0}, Landroidx/fragment/app/FragmentActivity;->getSupportFragmentManager()Landroidx/fragment/app/FragmentManager;

    move-result-object v2

    if-eqz p1, :cond_1

    const-wide/16 v3, 0x0

    .line 18
    invoke-direct {p0, v3, v4}, Lcom/estrongs/android/ui/dlna/activity/DlnaDeviceFileSelectActivity;->a(J)Ljava/lang/String;

    move-result-object p1

    invoke-virtual {v2, p1}, Landroidx/fragment/app/FragmentManager;->findFragmentByTag(Ljava/lang/String;)Landroidx/fragment/app/Fragment;

    move-result-object p1

    check-cast p1, Lcom/estrongs/android/ui/dlna/fragment/DlnaDeviceMusicFragment;

    const-wide/16 v3, 0x1

    .line 19
    invoke-direct {p0, v3, v4}, Lcom/estrongs/android/ui/dlna/activity/DlnaDeviceFileSelectActivity;->a(J)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Landroidx/fragment/app/FragmentManager;->findFragmentByTag(Ljava/lang/String;)Landroidx/fragment/app/Fragment;

    move-result-object v3

    check-cast v3, Lcom/estrongs/android/ui/dlna/fragment/DlnaDeviceVideoFragment;

    goto :goto_1

    .line 20
    :cond_1
    new-instance p1, Lcom/estrongs/android/ui/dlna/fragment/DlnaDeviceMusicFragment;

    invoke-direct {p1}, Lcom/estrongs/android/ui/dlna/fragment/DlnaDeviceMusicFragment;-><init>()V

    .line 21
    new-instance v3, Lcom/estrongs/android/ui/dlna/fragment/DlnaDeviceVideoFragment;

    invoke-direct {v3}, Lcom/estrongs/android/ui/dlna/fragment/DlnaDeviceVideoFragment;-><init>()V

    .line 22
    :goto_1
    iget-object v4, p0, Lcom/estrongs/android/ui/dlna/activity/DlnaDeviceFileSelectActivity;->r:Les/l10;

    invoke-virtual {p1, v4}, Lcom/estrongs/android/ui/dlna/fragment/BaseDlnaDeviceFragment;->a(Les/l10;)V

    .line 23
    iget-object v4, p0, Lcom/estrongs/android/ui/dlna/activity/DlnaDeviceFileSelectActivity;->r:Les/l10;

    invoke-virtual {v3, v4}, Lcom/estrongs/android/ui/dlna/fragment/BaseDlnaDeviceFragment;->a(Les/l10;)V

    .line 24
    iget-object v4, p0, Lcom/estrongs/android/ui/dlna/activity/DlnaDeviceFileSelectActivity;->q:Ljava/util/List;

    invoke-interface {v4, p1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 25
    iget-object p1, p0, Lcom/estrongs/android/ui/dlna/activity/DlnaDeviceFileSelectActivity;->q:Ljava/util/List;

    invoke-interface {p1, v3}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 26
    new-instance p1, Lcom/estrongs/android/pop/app/filetransfer/FragmentAdapter;

    iget-object v3, p0, Lcom/estrongs/android/ui/dlna/activity/DlnaDeviceFileSelectActivity;->q:Ljava/util/List;

    invoke-direct {p1, v2, v3, v0}, Lcom/estrongs/android/pop/app/filetransfer/FragmentAdapter;-><init>(Landroidx/fragment/app/FragmentManager;Ljava/util/List;Ljava/util/List;)V

    iput-object p1, p0, Lcom/estrongs/android/ui/dlna/activity/DlnaDeviceFileSelectActivity;->o:Lcom/estrongs/android/pop/app/filetransfer/FragmentAdapter;

    .line 27
    iget-object p1, p0, Lcom/estrongs/android/ui/dlna/activity/DlnaDeviceFileSelectActivity;->k:Landroidx/viewpager/widget/ViewPager;

    const/4 v0, 0x1

    invoke-virtual {p1, v0}, Landroidx/viewpager/widget/ViewPager;->setOffscreenPageLimit(I)V

    .line 28
    iget-object p1, p0, Lcom/estrongs/android/ui/dlna/activity/DlnaDeviceFileSelectActivity;->k:Landroidx/viewpager/widget/ViewPager;

    iget-object v0, p0, Lcom/estrongs/android/ui/dlna/activity/DlnaDeviceFileSelectActivity;->o:Lcom/estrongs/android/pop/app/filetransfer/FragmentAdapter;

    invoke-virtual {p1, v0}, Landroidx/viewpager/widget/ViewPager;->setAdapter(Landroidx/viewpager/widget/PagerAdapter;)V

    .line 29
    iget-object p1, p0, Lcom/estrongs/android/ui/dlna/activity/DlnaDeviceFileSelectActivity;->j:Lcom/google/android/material/tabs/TabLayout;

    iget-object v0, p0, Lcom/estrongs/android/ui/dlna/activity/DlnaDeviceFileSelectActivity;->k:Landroidx/viewpager/widget/ViewPager;

    invoke-virtual {p1, v0}, Lcom/google/android/material/tabs/TabLayout;->setupWithViewPager(Landroidx/viewpager/widget/ViewPager;)V

    .line 30
    iget-object p1, p0, Lcom/estrongs/android/ui/dlna/activity/DlnaDeviceFileSelectActivity;->j:Lcom/google/android/material/tabs/TabLayout;

    iget-object v0, p0, Lcom/estrongs/android/ui/dlna/activity/DlnaDeviceFileSelectActivity;->o:Lcom/estrongs/android/pop/app/filetransfer/FragmentAdapter;

    invoke-virtual {p1, v0}, Lcom/google/android/material/tabs/TabLayout;->setTabsFromPagerAdapter(Landroidx/viewpager/widget/PagerAdapter;)V

    .line 31
    iget-object p1, p0, Lcom/estrongs/android/ui/dlna/activity/DlnaDeviceFileSelectActivity;->q:Ljava/util/List;

    invoke-interface {p1, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Lcom/estrongs/android/pop/app/filetransfer/fragment/AbsSelectFileFragment;

    iput-object p1, p0, Lcom/estrongs/android/ui/dlna/activity/DlnaDeviceFileSelectActivity;->p:Lcom/estrongs/android/pop/app/filetransfer/fragment/AbsSelectFileFragment;

    .line 32
    iget-object p1, p0, Lcom/estrongs/android/ui/dlna/activity/DlnaDeviceFileSelectActivity;->k:Landroidx/viewpager/widget/ViewPager;

    new-instance v0, Lcom/estrongs/android/ui/dlna/activity/DlnaDeviceFileSelectActivity$a;

    invoke-direct {v0, p0}, Lcom/estrongs/android/ui/dlna/activity/DlnaDeviceFileSelectActivity$a;-><init>(Lcom/estrongs/android/ui/dlna/activity/DlnaDeviceFileSelectActivity;)V

    invoke-virtual {p1, v0}, Landroidx/viewpager/widget/ViewPager;->addOnPageChangeListener(Landroidx/viewpager/widget/ViewPager$OnPageChangeListener;)V

    return-void
.end method

.method protected onDestroy()V
    .locals 1

    .line 1
    iget-object v0, p0, Lcom/estrongs/android/ui/dlna/activity/DlnaDeviceFileSelectActivity;->p:Lcom/estrongs/android/pop/app/filetransfer/fragment/AbsSelectFileFragment;

    if-eqz v0, :cond_0

    invoke-virtual {v0}, Lcom/estrongs/android/pop/app/filetransfer/fragment/AbsSelectFileFragment;->f()Lcom/estrongs/android/pop/app/filetransfer/adapter/AbsSelectFileAdapter;

    move-result-object v0

    if-eqz v0, :cond_0

    .line 2
    iget-object v0, p0, Lcom/estrongs/android/ui/dlna/activity/DlnaDeviceFileSelectActivity;->p:Lcom/estrongs/android/pop/app/filetransfer/fragment/AbsSelectFileFragment;

    invoke-virtual {v0}, Lcom/estrongs/android/pop/app/filetransfer/fragment/AbsSelectFileFragment;->f()Lcom/estrongs/android/pop/app/filetransfer/adapter/AbsSelectFileAdapter;

    move-result-object v0

    invoke-virtual {v0}, Lcom/estrongs/android/pop/app/filetransfer/adapter/AbsSelectFileAdapter;->j()V

    .line 3
    :cond_0
    invoke-super {p0}, Lcom/estrongs/android/pop/esclasses/ESActivity;->onDestroy()V

    return-void
.end method

.method public onOptionsItemSelected(Landroid/view/MenuItem;)Z
    .locals 2

    .line 1
    invoke-interface {p1}, Landroid/view/MenuItem;->getItemId()I

    move-result v0

    const v1, 0x102002c

    if-ne v0, v1, :cond_0

    .line 2
    invoke-direct {p0}, Lcom/estrongs/android/ui/dlna/activity/DlnaDeviceFileSelectActivity;->G()V

    const/4 p1, 0x1

    return p1

    .line 3
    :cond_0
    invoke-super {p0, p1}, Lcom/estrongs/android/ui/base/HomeAsBackActivity;->onOptionsItemSelected(Landroid/view/MenuItem;)Z

    move-result p1

    return p1
.end method

.method protected onResume()V
    .locals 1

    .line 1
    iget-object v0, p0, Lcom/estrongs/android/ui/dlna/activity/DlnaDeviceFileSelectActivity;->p:Lcom/estrongs/android/pop/app/filetransfer/fragment/AbsSelectFileFragment;

    if-eqz v0, :cond_0

    invoke-virtual {v0}, Lcom/estrongs/android/pop/app/filetransfer/fragment/AbsSelectFileFragment;->f()Lcom/estrongs/android/pop/app/filetransfer/adapter/AbsSelectFileAdapter;

    move-result-object v0

    if-eqz v0, :cond_0

    .line 2
    iget-object v0, p0, Lcom/estrongs/android/ui/dlna/activity/DlnaDeviceFileSelectActivity;->p:Lcom/estrongs/android/pop/app/filetransfer/fragment/AbsSelectFileFragment;

    invoke-virtual {v0}, Lcom/estrongs/android/pop/app/filetransfer/fragment/AbsSelectFileFragment;->f()Lcom/estrongs/android/pop/app/filetransfer/adapter/AbsSelectFileAdapter;

    move-result-object v0

    invoke-virtual {v0}, Lcom/estrongs/android/pop/app/filetransfer/adapter/AbsSelectFileAdapter;->j()V

    .line 3
    :cond_0
    invoke-super {p0}, Lcom/estrongs/android/pop/esclasses/ESActivity;->onResume()V

    return-void
.end method

.method protected onStart()V
    .locals 4

    .line 1
    invoke-super {p0}, Lcom/estrongs/android/ui/base/HomeAsBackActivity;->onStart()V

    .line 2
    iget-object v0, p0, Lcom/estrongs/android/ui/dlna/activity/DlnaDeviceFileSelectActivity;->l:Landroidx/appcompat/app/ActionBar;

    .line 3
    invoke-static {}, Lcom/estrongs/android/ui/theme/b;->r()Lcom/estrongs/android/ui/theme/b;

    move-result-object v1

    invoke-virtual {p0}, Lcom/estrongs/android/ui/base/HomeAsBackActivity;->B()I

    move-result v2

    const v3, 0x7f060320

    invoke-virtual {v1, v2, v3}, Lcom/estrongs/android/ui/theme/b;->b(II)Landroid/graphics/drawable/Drawable;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroidx/appcompat/app/ActionBar;->setHomeAsUpIndicator(Landroid/graphics/drawable/Drawable;)V

    return-void
.end method
